﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Gnosis.Babel;
using Gnosis.SQLite.Numeric;
using Gnosis.SQLite.Predicates;

namespace Gnosis.SQLite.Values
{
    public class CastAsReal
        : Cast, IReal
    {
        public CastAsReal(IValue value)
            : base(value, TypeName.Real)
        {
        }

        #region INumeric Members

        public IRealColumnName As(string alias)
        {
            return new RealColumnName(ToString(), alias);
        }

        INumericColumnName INumeric.As(string alias)
        {
            return As(alias);
        }

        public IPredicate Between(INumeric start, INumeric end)
        {
            return new Between(this, start, end);
        }

        public IPredicate GreaterThan(INumeric value)
        {
            return new GreaterThan(this, value);
        }

        public IPredicate GreaterThanOrEqualTo(INumeric value)
        {
            return new GreaterThanOrEqualTo(this, value);
        }

        public IPredicate LessThan(INumeric value)
        {
            return new LessThan(this, value);
        }

        public IPredicate LessThanOrEqualTo(INumeric value)
        {
            return new LessThanOrEqualTo(this, value);
        }

        public INumeric Multiply(INumeric value)
        {
            return new Multiply(this, value);
        }

        #endregion
    }
}
